{"ast":null,"code":"import * as React from 'react';\nimport { SpaceContext } from '.';\nexport default function Item(_ref) {\n  let {\n    className,\n    direction,\n    index,\n    marginDirection,\n    children,\n    split,\n    wrap\n  } = _ref;\n  const {\n    horizontalSize,\n    verticalSize,\n    latestIndex,\n    supportFlexGap\n  } = React.useContext(SpaceContext);\n  let style = {};\n  if (!supportFlexGap) {\n    if (direction === 'vertical') {\n      if (index < latestIndex) {\n        style = {\n          marginBottom: horizontalSize / (split ? 2 : 1)\n        };\n      }\n    } else {\n      style = Object.assign(Object.assign({}, index < latestIndex && {\n        [marginDirection]: horizontalSize / (split ? 2 : 1)\n      }), wrap && {\n        paddingBottom: verticalSize\n      });\n    }\n  }\n  if (children === null || children === undefined) {\n    return null;\n  }\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: className,\n    style: style\n  }, children), index < latestIndex && split && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${className}-split`,\n    style: style\n  }, split));\n}","map":{"version":3,"names":["React","SpaceContext","Item","_ref","className","direction","index","marginDirection","children","split","wrap","horizontalSize","verticalSize","latestIndex","supportFlexGap","useContext","style","marginBottom","Object","assign","paddingBottom","undefined","createElement","Fragment"],"sources":["/data/messenger.client/node_modules/antd/es/space/Item.js"],"sourcesContent":["import * as React from 'react';\nimport { SpaceContext } from '.';\nexport default function Item(_ref) {\n  let {\n    className,\n    direction,\n    index,\n    marginDirection,\n    children,\n    split,\n    wrap\n  } = _ref;\n  const {\n    horizontalSize,\n    verticalSize,\n    latestIndex,\n    supportFlexGap\n  } = React.useContext(SpaceContext);\n  let style = {};\n  if (!supportFlexGap) {\n    if (direction === 'vertical') {\n      if (index < latestIndex) {\n        style = {\n          marginBottom: horizontalSize / (split ? 2 : 1)\n        };\n      }\n    } else {\n      style = Object.assign(Object.assign({}, index < latestIndex && {\n        [marginDirection]: horizontalSize / (split ? 2 : 1)\n      }), wrap && {\n        paddingBottom: verticalSize\n      });\n    }\n  }\n  if (children === null || children === undefined) {\n    return null;\n  }\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: className,\n    style: style\n  }, children), index < latestIndex && split && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${className}-split`,\n    style: style\n  }, split));\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,YAAY,QAAQ,GAAG;AAChC,eAAe,SAASC,IAAI,CAACC,IAAI,EAAE;EACjC,IAAI;IACFC,SAAS;IACTC,SAAS;IACTC,KAAK;IACLC,eAAe;IACfC,QAAQ;IACRC,KAAK;IACLC;EACF,CAAC,GAAGP,IAAI;EACR,MAAM;IACJQ,cAAc;IACdC,YAAY;IACZC,WAAW;IACXC;EACF,CAAC,GAAGd,KAAK,CAACe,UAAU,CAACd,YAAY,CAAC;EAClC,IAAIe,KAAK,GAAG,CAAC,CAAC;EACd,IAAI,CAACF,cAAc,EAAE;IACnB,IAAIT,SAAS,KAAK,UAAU,EAAE;MAC5B,IAAIC,KAAK,GAAGO,WAAW,EAAE;QACvBG,KAAK,GAAG;UACNC,YAAY,EAAEN,cAAc,IAAIF,KAAK,GAAG,CAAC,GAAG,CAAC;QAC/C,CAAC;MACH;IACF,CAAC,MAAM;MACLO,KAAK,GAAGE,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEb,KAAK,GAAGO,WAAW,IAAI;QAC7D,CAACN,eAAe,GAAGI,cAAc,IAAIF,KAAK,GAAG,CAAC,GAAG,CAAC;MACpD,CAAC,CAAC,EAAEC,IAAI,IAAI;QACVU,aAAa,EAAER;MACjB,CAAC,CAAC;IACJ;EACF;EACA,IAAIJ,QAAQ,KAAK,IAAI,IAAIA,QAAQ,KAAKa,SAAS,EAAE;IAC/C,OAAO,IAAI;EACb;EACA,OAAO,aAAarB,KAAK,CAACsB,aAAa,CAACtB,KAAK,CAACuB,QAAQ,EAAE,IAAI,EAAE,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